1. Field of the Invention
The present invention relates to a control apparatus for a welding robot which is provided with a welding gun at a front end of a robot arm, and also relates to a method of teaching a welding robot.
2. Description of the Related Art
As this kind of conventional control apparatus for a welding robot, there has hitherto been known the following one, e.g., in Japanese Published Examined Patent Application No. 28265/1991. Namely, in a control apparatus for a welding robot, which is provided with a welding transformer and a welding gun at a front end of a robot arm, a welding inverter apparatus, which supplies the transformer with electric power and a driving control apparatus, which controls driving servomotors for the welding robot, are contained in a single casing so as to constitute a single control apparatus.
The construction of the above-described driving control apparatus is known, e.g., in Published Unexamined Japanese Patent Application No. 204422/1993. Namely, circuit boards for amplifiers (i.e., amplifier circuit boards), each being called a servo controller, for controlling servomotors having three axes, are connected depending on the number of axes of the welding robot. For example, in case the welding robot has five axes, two amplifier circuit boards are connected in parallel with each other. As shown in FIG. 10, inside one amplifier circuit board 1A, there are provided PWM (pulse width modulating) generators 11, 12, 13, which output corresponding PWM signals to respective servomotors M, to be controlled by the amplifier circuit board 1A, and inverters 21, 22, 23, which supply each of the servomotors M with three-phase electric current, based on the PWM signals from the PWM generators 11, 12, 13. Among the electric currents to be supplied from each of the inverters 21, 22, 23 to the servomotors M, the electric currents of U phase and V phase are detected by electric current sensors and are inputted to a multiplexer 3. In the multiplexer 3, the electric current signals of U phase and V phase are sequentially switched, with respect to the servomotors M; and are outputted to A/D converters 41, 42. The supply electric current to each of the servomotors M is thus feedback-controlled (i.e, controlled by way of feedback). To a rotary shaft of the servomotors M, there is connected a pulse generator PG, which outputs a signal corresponding to the rotational speed of the servomotor M. The rotational speed signals to be outputted from the pulse generators PG are captured via interfaces 51, 52, 53 to thereby feedback-control the rotational speeds of the servomotors M.
Each of the servomotors M varies in output characteristics, depending on which portion of the robot it is mounted. For example, in case the transformer for the welding gun, is supplied with electric power via an inverter, the characteristics of the transformer and the characteristics of each of the servomotors are completely different from each other. Since the inverters 21, 22, 23 must be set in accordance with respective characteristics, inverters 21, 22, 23 must be respectively prepared for exclusive uses to suit the characteristics of each of the servomotors M and the characteristics of the transformer that are connected.
In the above-described conventional apparatus, the inverters 21, 22, 23 are for exclusive use to suit the servomotors M and the transformer to which the inverters 21, 22, 23 are connected. Therefore, the amplifier circuit boards 1A become specific (or exclusive) and must be manufactured for each combination of loads to be connected to each of the inverters 21, 22, 23.
It may be considered to detachably mount the inverters. If this is done it becomes necessary to build in servo software which corresponds to each of the inverters, resulting in built in man-hours for building in the servo software. Further, there is a possibility that a wrong servo software may be built in, by mistake at the time of building in the servo software.
Further, in the above-described conventional control apparatus, as described in Japanese Published Examined Patent Application No. 28265/1991, the welding inverter apparatus and the driving control apparatus are contained in a single casing. However, the welding inverter apparatus and the driving control apparatus are constituted into separate bodies. Therefore, there are disadvantages in that the casing becomes large and that there is a limit to freedom in layout of the welding apparatus. Further, since the welding inverter apparatus and the driving control apparatus are constituted into separate bodies, in performing the teaching operations for the welding robot, the teaching for the welding inverter apparatus and the teaching for the driving control apparatus must be separately performed. Therefore the teaching work becomes troublesome.
An explanation will now be made about the conventional method of teaching the welding robot.
For example, in Japanese Published Unexamined Utility Model Registration Application No. 33968/1993 and in Japanese Published Unexamined Patent Application No. 261560/1993, there is shown a conventional method of teaching its welding robot in which the opening and closing of the welding gun is performed by a servomotor. The opening and closing of the conventional welding gun is servo-controlled by a control apparatus which controls the motion of the robot arm in a similar manner as a servomotor of each axis which drives the robot arm. Therefore, in performing the teaching operation of the welding robot, the teaching for the motion of the robot arm and the teaching for the opening and closing of the welding gun must be performed seperately.
For example, when welding is carried out at a welding point X (hereinafter simply called X) and then at a next welding point Y (hereinafter simply called Y) by moving the welding gun to Y, teaching is performed at X and Y for the motion of the robot arm, and further teaching is further performed for the opening and closing of the welding gun at a point (a point of completion of opening of the welding gun) which is away from X by a predetermined distance and at a point of starting the closing of the welding gun which is before Y by a predetermined distance.
In the above-described conventional method of teaching, if it relates only to the motion of the robot arm, the teaching at X and Y will be sufficient, with the distance between X and Y being interpolated. Therefore, if the teaching for the opening and closing of the welding guns is not performed, the robot arm will move from X to Y without stopping inbetween. In order to perform the teaching for the opening and closing of the welding gun at the above-described two points, these two points also become the teaching points for the robot arm which is to be synchronized with the opening and closing of the welding gun. Therefore, the robot arm will have to perform unnecessary deceleration and acceleration at these two teaching points while it moves from X to Y, resulting in a poor teaching efficiency.